package com.appbee.article.server;

import com.appbee.core.server.requestfactory.BaseService;

public class ArticleService extends BaseService<Article, ArticleDAO>
{
	public Article getByStrId(String strId)
	{
		ArticleDAO dao = daoProvider.get();
		Article a = dao.findByStrId(strId);
		if(a==null)
		{
			a = new Article();
			a.setStrId(strId);
			dao.store(a);
		}
		return a;
	}
	
	public Article save(Article article)
	{
		daoProvider.get().save(article);
		return article;
	}
}
